<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box">喂喂喂,123</div>
    
    <script>
        // 获取dom元素
        const box = document.querySelector(".box")
        // 通过innertext属性获取到元素内容, 不解析标签
        console.log(box.innerText);
        // 修改元素内容
        box.innerHTML = "<strong>喂喂喂,123</strong>" //innerHtml属性解析标签
        console.log(box.innerHTML)
    </script>
</body>
</html>